package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CheckItemMapper {


    List<CheckItem> selectByCondition(QueryPageBean queryPageBean);
@Insert("insert into t_checkitem(code,name,sex,age,price,remark,attention,type) values(#{code},#{name},#{sex},#{age},#{price},#{remark},#{attention},#{type})")
    void add(CheckItem checkItem);
@Delete("delete from t_checkitem where id=#{id}")
    void delete(Integer id);
@Select("select * from t_checkitem where id=#{id}")
    CheckItem findById(Integer id);
@Update("update t_checkitem set code=#{code},name=#{name},sex=#{sex},age=#{age},price=#{price},remark=#{remark},attention=#{attention},type=#{type} where id=#{id}")
    void edit(CheckItem checkItem);

    List<CheckItem> findAll();

    List<Integer> findCheckItemIdsByCheckGroupId(Integer id);
}
